/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thinkinginjava.svn.strings.regularexpressions;

/**
 *
 * @author evenpet
 */
public class Replacing {

    static String s = Splitting.knights;

    public static void main(String[] args) {
        System.out.println(s.replaceFirst("f\\w+", "REPLACED"));
        System.out.println(s.replaceAll("shrubbery|tree|herring", "BANANA"));
    }
}
